<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<script src="js/axios.js"></script>
		<script src="js/pz.js"></script>
		<link rel="stylesheet" type="text/css" href="css/denglu.css"/>
	</head>
	<body>
		<div class="header">
		    <div class="w">
		            <div class="logo">
		                <a href="#" class="bglogo"></a>
		            </div>
		           <div class="welcome">欢迎登录</div>
		      
		        <div class="fr">
		         <span></span><a href="">登录页面,</a> <a href="" class="col">调查问卷</a>
		        </div>
		    </div>
		</div>
			<!-- 头部结束 -->
		<div class="contains">
			<div class="texts">
			依据《网络安全法》，为保障您的账户安全和正常使用，请尽快完成手机号验证！ 新版《京东隐私政策》已上线，将更有利于保护您的个人隐私
			</div>
			<div class="tp">
				<div class="jd">
					<img src="images/c.png" >
				</div>
				<div class="dl">
					<p class="top">京东不会以任何理由要求您转账汇款，谨防诈骗</p>
					<div class="sm ">
						<span class="sms">扫码登录</span><span id="smss">账号登录</span>
					</div>
					<div class="main" >
					<div class="ma">
						<div class="er">
							<img src="images/show.png" calss="ers">	
						</div>
						<div class="sj">
							<img src="images/phone-orange.png"  >
						</div>
					</div>
					<div class="dk">
						打开 手机京东  扫描二维码
					</div>
					<div class="ff">
						<ul class="ffs">
							<li><span></span>免输入</li>
							<li><span></span>更快&nbsp</li>
							<li><span></span>更安全</li>
						</ul>
					</div>
					</div>
					<div class="zh">
						<div >
						        <label class="phone"></label>
						        <input type="text" class="phone2 username" placeholder="邮箱/用户名/已验证手机号" />
						</div>
						<div>
							        <label class="mm"></label>
							        <input type="text" class="phone2 password" id="password" placeholder="密码" />
						</div>
						<div class="wj">
							<p class="wm">忘记密码</p>
						</div>
						<a href="javasript:;" class="dls">登录</a>
					</div>
					<div class="db">
						<ul>
							<li><span></span>QQ <b>|</b></li>
							<li><span></span>微信</li>
							<li class="register"><span></span>立即注册</li>
						</ul>
					</div>
				</div>		
			</div>
		</div>
		
	<div  class="footer" id="foot">
	        <div class="links" id="link">
	        <a> 关于我们</a>|
	        <a >联系我们</a>|
	        <a >人才招聘</a>|
	        <a >商家入驻</a>|
	        <a >广告服务</a>|
	        <a >手机京东</a>|
	        <a >友情链接</a>|
	        <a >销售联盟</a>|
	        <a >京东社区</a>|
	        <a >京东公益</a>|
	        <a>English Site</a>
	    </div>
	    <div>
	        Copyright&copy;2004-2019&nbsp;&nbsp;京东JD.com&nbsp;版权所有
	    </div>
	</div>
	</body>
	<script src="jquery-1.11.3.js" type="text/javascript" charset="utf-8"></script>
	<script type="text/javascript">
		$(function(){
				 $(".sj").show();
				 $('.er').animate({'left':"0"})
					time = setInterval("hideAd()",4000);
						// 鼠标经过
			$('.ma').hover(function(){
				$('.er').animate({'left':"0"});
				$('.sj').show();
				clearInterval(time);
			},function(){
				$('.er').animate({'left':"64px"})
				$(".sj").hide();
			})
			
			$('.sm span').click(function(){
				$(this).addClass('sms').siblings().removeClass('sms')	
			})
			$('#smss').click(function(){
				$(".main").hide();
				$('.zh').show()
				})
			
		})
		$('.sms').click(function(){
			$(".zh").hide();
			$('.main').show()
			$('.er').animate({'left':"0"});
			showAd()
				
			})
			
		function showAd(){
				$(".sj").show();
				$('.er').animate({'left':"0"})
				time = setInterval("hideAd()",4000);
			}

		function hideAd(){
			clearInterval(time);
			$(".sj").hide();
			$('.er').animate({'left':"64px"})	
		}; 
		
		$('.register').click(function(){
			location.href='index.html'
		})
		$('.dls').click(function(){
			let username = $('.username').val()
			let password = $('.password').val()
			
			$.post("http://47.104.244.134:8080/userlogin.do",{
				name:username,
				password:password
				}).done(data=>{
				if(data.code == 0){
					let token = data.data.token
					localStorage.setItem('token',token)
					localStorage.setItem('username',username)
					
					alert(username+'登陆成功')
					window.location.href = 'index.html'
				}
			})
		})
	</script>
</html>
